package work.parabola.assets.common;

/**
 * 
 * @author 黄松祥
 * 2018年7月24日 上午10:23:32
 */
public class CreditUserConst {
	
	public enum BatchUploadType{
		NEW_INSERT(0, "新增"),
		UPDATE(1, "变更");
		private int code;
		
		private String value;
		
		private BatchUploadType(int code, String value){
			this.code = code;
			this.value = value;
		}
		public int getCode() {
			return code;
		}

		public String getValue() {
			return value;
		}
		public static BatchUploadType codeOf(int code){
            for(BatchUploadType batchUploadType : values()){
                if(batchUploadType.getCode() == code){
                    return batchUploadType;
                }
            }
            return null;
        }
		public static BatchUploadType searchByValue(String value){
			for(BatchUploadType batchUploadType : values()){
				if(batchUploadType.getValue().equals(value)){
					return batchUploadType;
				}
			}
			return null;
		}
		
	}
}
